package com.otitan.forest.right.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.otitan.forest.right.entity.BssAuditRecordsEntity;
import com.otitan.forest.right.entity.BssForestRightInfoEntity;
import com.otitan.forest.right.entity.SysOrganizationEntity;
import com.otitan.forest.right.po.StatisticsPo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 林权证登记
 *
 * @author xiazw
 * @email *****@mail.com
 * @date 2020-08-04 14:19:43
 */
@Mapper
public interface BssForestRightInfoMapper extends BaseMapper<BssForestRightInfoEntity> {

    /**
     * 根据 ids 查询数据
     *
     * @param ids
     * @return java.util.List<com.otitan.forest.right.entity.BssForestRightInfoEntity>
     * @throws
     * @author jiachangsen
     * @date 2020/08/06 16:35
     */
    List<BssForestRightInfoEntity> findItemsByIds(List<String> ids);

    /**
     * 入库总本数 、 入库面积
     * 发证总本数 、 入库面积
     *
     * @return java.util.Map<java.lang.String   ,   java.lang.Object>
     * @throws
     * @author jiachangsen
     * @date 2020/08/08 23:04
     */
    List<StatisticsPo> findTotalNumAndTotalArea(Map<String, Object> params);

    /**
     * 入库宗地数
     * 发证宗地数
     *
     * @return java.math.BigDecimal
     * @throws
     * @author jiachangsen
     * @date 2020/08/09 10:07
     */
    List<StatisticsPo> findTotalGroundNum(Map<String, Object> params);


    /**
     * 根据 id 查询数据
     *
     * @param id
     * @return java.util.List<com.otitan.forest.right.entity.BssForestRightInfoEntity>
     * @throws
     * @author wangqs
     */
    List<BssAuditRecordsEntity> findRecordsById(String id);


    /**
     * 查询 组织机构表数据数据
     *
     * @param
     * @return java.util.List<com.otitan.forest.right.entity.SysOrganizationEntity>
     * @throws
     * @author wangqs
     */
    List<SysOrganizationEntity> findOrganzationList();




    /**
     * 根据 宗地号 查询是否重复
     *
     * @param groundNo
     * @return Long
     * @throws
     * @author wangqs
     * @date 2020/08/06 16:35
     */
    Long findCountByGroundNo(Map<String, String> map);

    /**
     * 查询所宗地号
     * @author jiachangsen
     * @param []
     * @return java.util.Map<java.lang.String,java.lang.String>
     * @exception
     * @date 2020/08/25 14:07
     */
    List<BssForestRightInfoEntity> getAllGroundNo();

    List<BssForestRightInfoEntity> findSdeLqData(Page<BssForestRightInfoEntity> page);

    void deleteData();
}
